import time
from configs.config import global_var
from configs.evaluate_conf import load_predict_config
from utils.base_util import new_fold
from tester.test_tool import Tester
from numpy import mean, var


# global_var.address = 'C:/Users/adminTKJ/Desktop/RLIR_sumup/'


if __name__ == "__main__":
    new_fold('eval_result', ['log', 'distribution', 'drr_vis_result'])
    tester_conf = load_predict_config(global_var.loading_address)
    tester = Tester(**tester_conf)
    tester.run_test(mode='标准正位')
    tester.save_data(mode='notrefine')
    # print(tester.all_max_distance)
    print("VM均值:{0}".format(mean(tester.all_voxel_distance)))
    print("角度均值：{0}".format(mean(tester.all_r, axis=0)))
    print("平移均值：{0}".format(mean(tester.all_t, axis=0)))
    print("VM方差:{0}".format(var(tester.all_voxel_distance)))
    print("角度方差：{0}".format(var(tester.all_r, axis=0)))
    print("平移方差：{0}".format(var(tester.all_t, axis=0)))
